<?php

class Country extends Zend_Db_Table_Abstract
{
	protected $_name = 'places_country';
	protected $_referenceMap = array(
		
		'Reporter' => array(
		'columns'        => array('user_id'),
		'refTableClass' => 'Accounts',
		));

}

class PostCodeUS extends Zend_Db_Table_Abstract
{
	protected $_name = 'places_postCode_US';
	protected $_referenceMap = array(
				'Reporter' => array(
				'columns'        => array('country_id'),
				'refTableClass' => 'Country',
				'refColumns' => 'id'
				));
	
	public function insert(array $data)
	{
		if(empty($data['created_on'])) {
			$data['created'] = time();
		}
		return parent::insert($data);
	}
	
}

class Timezone extends Zend_Db_Table_Abstract
{
	protected $_name = 'places_timezone';
}
?>
